package net.da.client.common.component;

import java.util.Map;

import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.VerticalPanel;

public abstract class AbstractComponent implements Component {
	
	private Panel componentRoot;
	private ComponentDef componentDef;
	
	AbstractComponent() {
		this.componentRoot = new VerticalPanel();		
	}
			
	public final Panel getComponentRoot()  {
		return componentRoot;
	}
	
	void setComponentDef(ComponentDef componentDef) {
		this.componentDef = componentDef;
	}

	public final ComponentDef getComponentDef() {
		return componentDef;
	}
	
	public abstract void onShow();
	
	public abstract void onHide();
		
	public abstract void onInit(Map initArgs);

	public abstract void onReturn(Map returnArgs);

	public abstract void onExit();
	
}
